package cc.atliberty.structural.composite.ex3;

/**
 * @Author 元宵
 * @url www.atliberty.cc
 * @Date 2023-10-31 09:01
 * @description:
 */
public abstract class Node {
    protected String name;
    public Node(String name) {
        this.name = name;
    }
    
    public void addNode(Node node) throws Exception{
        throw new Exception("invalid exception");
    }
    
    abstract void display();
}
